package com.dlc.shop.sys.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 店铺角色
 * @author yami
 * @date 2021-03-01 17:42:09
 */
@Data
@TableName("tz_shop_role")
public class ShopRole implements Serializable{
    private static final long serialVersionUID = 1L;


    @TableId
    @Schema(description = "角色id" )
    private Long roleId;
    /**
     * 店铺id
     */
    @Schema(description = "店铺id" )
    private Long shopId;

    /**
     * 角色名称
     */
    @Schema(description = "角色名称" )
    @NotBlank(message="角色名称不能为空")
    private String roleName;
    /**
     * 备注
     */
    @Schema(description = "备注" )
    private String remark;
    /**
     * 创建者ID
     */
    @Schema(description = "创建者ID" )
    private Long createEmployeeId;
    /**
     * 创建时间
     */
    @Schema(description = "创建时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(exist=false)
    @Schema(description = "菜单id列表" )
    private List<Long> menuIdList;
}
